<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.greenClass{
				width: 400px;
				height: 200px;
				background-color: aquamarine;
			}
		</style>
	</head>
	<body>
		<div id="app4">
			<div v-bind:class="{greenClass: flag}"></div>
			<button @click="changeF()">取消颜色</button>
		</div>
		
		<script src="../vue.js"></script>
		<script>
			const a2 = new Vue({
				el: '#app4',
				data: {
					flag: true
				},
				methods:{
					changeF: function(){
						this.flag = !this.flag
					}
				}
			})
		</script>
	</body>
</html>
